package com.smallpineapple.turing.controller.guest;

import com.smallpineapple.turing.util.JsonResultUtil;
import com.smallpineapple.turing.entity.History;
import com.smallpineapple.turing.service.guest.IntroductionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Jack
 * @date 2019-06-27-17:00
 * 前台团队简介介绍接口
 */
@Api(tags = "获取团队简介介绍接口")
@RestController
@RequestMapping("/guest/introduction")
@CrossOrigin
public class IntroductionController {

    @Autowired
    IntroductionService introductionService;

    @ApiOperation(value = "查询团队简介介绍")
    @GetMapping(value = "")
    public JsonResultUtil getIntroduction(){

        History history = introductionService.getIntroduction();
        JsonResultUtil jsonResultUtil = JsonResultUtil.success().addObject("history", history);
        return jsonResultUtil;

    }

}
